.ix-card(@card,@head,@title,@height) {
    margin: @card @card 0;
    .ant-card-body {
        padding: @card;
    }
    .ant-card-head {
        padding: 0 @head !important;
        height: @height !important;

        .ant-card-head-wrapper {
            height: @height !important;
        }

        .ant-card-head-title {
            padding: @title 0;
        }
    }
}

.ix-tab(@bar) {
    &-container {
        margin: @bar @bar 0;
        padding-right: @bar / 2;
        padding-top: 8px;
    }
    .ant-tabs-bar {
        margin: 0 0 @bar 0 !important;
    }
}

.ix-row(@bottom) {
    margin-bottom: 0 0 @bottom 0 !important;
    height: 38px !important;
}

.ix-table(@cell, @empty) {
    // 普通 <Table/>
    table {
        thead > tr > th {
            padding-top: @cell;
            padding-bottom: @cell;
        }

        tbody > tr > td {
            padding-top: @cell;
            padding-bottom: @cell;
        }
    }
    .ant-empty {
        // margin: @empty 0 !important;
    }
}

.ix-form-row {
    .each(@rowHeight, @max, @i:1) when (@i =< @max) {
        .ant-col-@{i} {
            /*
             * margin-top: @rowHeight;
             */

            .ant-form-item {
                margin-bottom: 0 !important;

                .has-success, .has-error {
                    width: 100%;
                }

                .has-success {
                    .ant-form-item-children {
                        .ant-select-arrow {
                            right: 11px;
                        }

                        .ant-form-item-children-icon {
                            display: none;
                        }
                    }
                }
            }
        }
        .ix-form-row.each(@rowHeight, @max, @i + 1)
    }
}

.ix-form(@rowHeight) {
    // 每一行
    .ix-form-row.each(@rowHeight, 24);
}

.ix-dialog(@bodyPadding, @headerPadding, @footerPadding, @close) {
    .ant-modal {
        &-body {
            padding: @bodyPadding !important;
        }

        &-header {
            padding: @headerPadding !important;
        }

        &-close {
            width: @close !important;
            height: @close !important;

            &-x {
                width: @close !important;
                height: @close !important;
                line-height: @close !important;
            }
        }

        &-footer {
            padding: @footerPadding !important;
        }
    }
}